home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
music
/
5mods_1.arj
/
BBSLIST.MOD
next >
Wrap
Text File
|
1994-01-26
|
6KB
|
205 lines
BBSLIST.MOD Thunder @ Thunder Inc. 609-627-7279
I stole this from somewere dont remember where but it din't look right
so i spruced it up a little added a little color and wala all credit goes
to whoever made it the first time.
Replace void bbslist(void) with this one then read bottom footnote!!!
BTW: Don't blame me it works fine here!!!
void bbslist(void)
{
int i,f,done,ok;
char s[150],s1[150],ch,ch1,*ss,s2[150],s3[81];
char phone[13], name[31], speed[6], type[11], meg[11], nup[11], group[11],
comment[31];
long l,l1;
done=0;
do {
helpl=0;
nl();
prt(3,get_string(489));
ch=onek("QRNA");
switch(ch) {
case 'Q':
done=1;
break;
case 'R':
printfile("BBSLIST.MSG");
if (okansi())
npr("\x1b[%dA",1);
pl("9══════════════════════════════╧════════════╧══════════════╧════════════════");
break;
case 'N':
print_net_listing(0);
break;
case 'A':
helpl=25;
if ((actsl<=10)) {
nl();
nl();
pl(get_string(490));
nl();
break;
}
if (thisuser.restrict & restrict_automessage) {
nl();
nl();
pl(get_string(491));
nl();
break;
}
nl();
pl(get_string(492));
pl(get_string(493));
outstr(":");
mpl(12);
input(phone,12);
if ((phone[3]!='-') || (phone[7]!='-'))
phone[0]=0;
for (i=0; i<12; i++) {
if (strchr("0123456789-",phone[i])==0)
phone[0]=0;
}
if (strlen(phone)==12) {
ok=1;
sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
f=sh_open1(s1,O_RDONLY | O_BINARY);
if (f>0) {
sh_lseek(f,0L,SEEK_SET);
l=filelength(f);
if ((ss=malloca(l+500L))==NULL) {
sh_close(f);
return;
}
sh_read(f,ss,(int)l);
l1=0L;
while ((l1<l) && (ok)) {
i=0;
do {
ch=ss[l1++];
s1[i]=ch;
if (ch==13)
s1[i]=0;
++i;
} while ((ch!=10) && (i<120) && (l1<l));
if (strstr(s1,phone)!=NULL)
ok=0;
if (strncmp(s1,phone,12)==0)
ok=0;
}
farfree(ss);
sh_close(f);
}
if (ok) {
pl(get_string(494));
nl();
nl();
pl(get_string(495));
outstr(":");
mpl(30);
inputl(name,30);
nl();
pl(get_string(496));
pl(get_string(497));
outstr(":");
mpl(4);
input(speed,4);
nl();
pl(get_string(498));
outstr(":");
mpl(9);
input(type,9);
nl();
pl("How much hard disk space does this BBS has?");
outstr(":");
mpl(10);
inputl(meg,10);
if (meg[0]==0)
strcpy(meg,"Unknown");
nl();
pl("What is the new user password?");
outstr(":");
mpl(10);
inputl(nup,10);
if (nup[0]==0)
strcpy(nup,"None");
nl();
pl("Enter Network or Group Affiliations");
outstr(":");
mpl(10);
inputl(group,10);
if (group[0]==0)
strcpy(group,"None");
nl();
pl("Enter Comment About This BBS");
outstr(":");
mpl(30);
inputl(comment,30);
nl();
sprintf(s3,"9══════════════════════════════╪════════════╪══════════════╪════════════════\r\n");
sprintf(s,"2%-30s9│2 %-10s9 │2 %-12s9 │2 %-5s\r\n9",name, type, phone, speed);
sprintf(s2,"8%-30s9│8 %-10s9 │8 %-12s9 │8 %-5s\r\n9",comment, meg, nup, group);
nl();
nl();
pl(s);
if (okansi())
npr("\x1b[%dA",1);
pl(s2);
nl();
prt(9,get_string(499));
if (yn()) {
sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
f=sh_open(s1,O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
if (filelength(f)) {
sh_lseek(f,-1L,SEEK_END);
sh_read(f,((void *)&ch1),1);
if (ch1==26)
sh_lseek(f,-1L,SEEK_END);
}
sh_write(f,(void *)s3,strlen(s3));
sh_write(f,(void *)s,strlen(s));
sh_write(f,(void *)s2,strlen(s2));
sh_close(f);
nl();
pl(get_string(500));
}
} else {
pl(get_string(501));
nl();
nl();
}
} else {
nl();
pl(get_string(502));
nl();
}
break;
}
} while ((!done) && (!hangup));
}
--------------------------------------------------------------------------
4 Thunder Inc. BBS Listing4 0
9══════════════════════════════╤════════════╤══════════════╤════════════════
2BBS Name 9 │2 Software 9 │2 Phone Number9 │2 Speed
8Comment On BBS 9 │8 HD Space 9 │8 New User Pwd9 │8 Group
9══════════════════════════════╧════════════╧══════════════╧════════════════
-----------------------------------------------------------------------------
Cut out above not the lines above and below just whats in the middle cut it
out and save it as bbslist.msg then copy it to gfiles section
go into misccmd.c and replace void (bbslist) with this one change the color
if you want to BTW back up your sourcey's and back up your bbslist.msg if
they mean anything to you.